package com.basic.common.exception.business;

import com.basic.common.exception.Errors;

public class DataException extends RuntimeException{
    private static final long serialVersionUID = 1L;
    private String code;
    private String msg;
    private String exception;
    private Object object;
    private Byte systemId;

    public DataException() {
        super();
    }

    public DataException(Throwable cause) {
        super(cause);
    }



    public DataException(String mes) {
        this.msg = mes;
        this.code="-1";
        this.exception= "";
    }

    public DataException(String code, String exception, String msg) {
        super(msg);
        this.code = code;
        this.exception = exception;
        this.msg = msg;
    }

    public DataException(String code, String exception, String msg, Object object) {
        super(msg);
        this.code = code;
        this.exception = exception;
        this.msg = msg;
        this.object = object;
    }

    public DataException(String code, String exception, String msg, Object object, Byte systemId) {
        super(msg);
        this.code = code;
        this.exception = exception;
        this.msg = msg;
        this.object = object;
        this.systemId = systemId;
    }

    public DataException(String code, String exception, String msg, Byte systemId) {
        super(msg);
        this.code = code;
        this.exception = exception;
        this.msg = msg;
        this.systemId = systemId;
    }

    public DataException(Errors errors) {
        super(errors.msg);
        this.code = errors.code;
        this.exception = errors.exception;
        this.msg = errors.msg;
    }

    public DataException(Errors errors, Object object) {
        super(errors.msg);
        this.code = errors.code;
        this.exception = errors.exception;
        this.msg = errors.msg;
        this.object = object;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public String getException() {
        return exception;
    }

    public void setException(String exception) {
        this.exception = exception;
    }

    public Object getObject() {
        return object;
    }

    public void setObject(Object object) {
        this.object = object;
    }

    public Byte getSystemId() {
        return systemId;
    }

    public void setSystemId(Byte systemId) {
        this.systemId = systemId;
    }
}
